body {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    color: #333;
    overflow-x: hidden; /* 确保不会出现水平滚动条 */
    box-sizing: border-box;
}

/* 头部样式 */
.header {
    background-color: #2d63af;
    padding: 15px;
    color: white;
    text-align: center;
    font-size: 24px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%; /* 确保头部占满宽度 */
    box-sizing: border-box;
}

/* 搜索框样式 */
.search-container {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    max-width: 400px;
    width: 100%;
    margin: 20px auto;
    box-sizing: border-box;
}

.search-input {
    flex-grow: 1;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 16px;
    outline: none;
    color: #333;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-button {
    background-color: #2d63af;
    border: none;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-button:hover {
    background-color: #244a8b;
    transform: scale(1.05);
}

.search-icon {
    width: 20px;
    height: 20px;
    color: #fff;
}

/* 商品分类和展示样式 */
.categories, .latest {
    background-color: white;
    margin: 15px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    flex-grow: 1;
    box-sizing: border-box;
}

.categories h2, .latest h2 {
    margin-bottom: 15px;
    color: #2d63af;
}

.icons, .items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    box-sizing: border-box;
}

.icon {
    text-align: center;
    padding: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.icon img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 20px;
    margin-bottom: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.icon span {
    font-size: 14px;
    color: #333;
    text-align: center;
    margin-top: 8px;
}

.icon:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    box-sizing: border-box;
}

.item {
    width: calc(50% - 10px);
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 20px;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.item img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.item .price {
    font-size: 16px;
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 10px;
}

.details {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #333;
}

.details span {
    font-size: 14px;
    margin: 2px 0;
    text-align: center;
}

/* 页脚样式 */
.footer {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background-color: #fff;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    border-top: 1px solid #ccc;
    z-index: 1000;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.footer div {
    text-align: center;
    color: #999;
}

.footer div span {
    display: block;
    margin-top: 5px;
    font-size: 12px;
}

.footer .active {
    color: #2d63af;
}
